package com.onpositive.dataminer.rcp.views;

import java.util.Collection;

import com.onpositive.dataminer.core.DefaultUniverse;
import com.onpositive.dataminer.core.ICanExtractImages;
import com.onpositive.knowledge.model.IThing;
import com.onpositive.knowledge.model.IUniverse;

public class ImageViewPart extends SelectionView {

	public ImageViewPart() {
		super("ui/imageView.dlf");
	}

	@Override
	protected Class getTargetClass() {
		return IThing.class;
	}

	public void extractImages(){
		Collection<IUniverse> subUniverses = DefaultUniverse.getInstance().getSubUniverses();
		for (IUniverse l:subUniverses){
			if (l instanceof ICanExtractImages){
				ICanExtractImages km= (ICanExtractImages) l;
				km.extractImages();
			}
		}
		getBinding().refresh();
	}
}
